package com.jsbs.iam.auth.mapper;

import com.jsbs.iam.auth.dto.IamDynamicUserGroupFilterRuleAddDto;
import com.jsbs.iam.auth.entity.IamUserGroupDynamicFilterRule;
import com.jsbs.iam.auth.param.IamQueryDynamicUserGroupBeforeParam;
import com.jsbs.iam.auth.param.IamQueryDynamicUserGroupUsersParam;
import com.jsbs.iam.auth.param.IamStaticUserGroupDeleteParam;
import com.jsbs.iam.auth.vo.IamUserGroupDynamicFilterRuleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IamUserGroupDynamicFilterRuleMapper {


    /**
     * 功能描述：获取动态用户组所有规则数据
     * @return
     */
    List<IamUserGroupDynamicFilterRule> queryForRule(@Param("companyCode") String companyCode);

    /**
     * 功能描述：获取某个动态用户组下的所有规则数据
     * @return
     */
    List<IamUserGroupDynamicFilterRule> queryuserGroupDynamicForRule(IamQueryDynamicUserGroupBeforeParam iamQueryDynamicUserGroupBeforeParam);

    /**
     * 功能描述：添加动态用户组筛选规则
     * @return
     */
    int userGroupDynamicFilterRuleAdd(IamDynamicUserGroupFilterRuleAddDto iamDynamicUserGroupFilterRuleAddDto);

    /**
     * 功能描述：删除动态用户组筛选规则
     * @return
     */
    int userGroupDynamicFilterRuleADelete(IamStaticUserGroupDeleteParam iamStaticUserGroupDeleteParam);

    /**
     * 功能描述：该动态用户组下的筛选规则条件
     * @param iamQueryDynamicUserGroupUsersParam
     * @return List
     */
    List<IamUserGroupDynamicFilterRuleVo> queryDynamicUserGroupUserInfo(@Param("iamQueryDynamicUserGroupUsersParam") IamQueryDynamicUserGroupUsersParam iamQueryDynamicUserGroupUsersParam);
}